/**
 * 
 */
package huajiu.com.controller;

import huajiu.com.base.ImgApiResponse;
import huajiu.com.service.ImgApiService;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ItBotPjq
 *2018年2月9日
 */
@RestController
@RequestMapping(value = "/imgapi/")
public class ImgApiController {
	
	@Autowired
	ImgApiService imgService;
	
	@ResponseBody
	@RequestMapping(value="face.do",method=RequestMethod.POST)
	public ImgApiResponse getCor(HttpServletRequest request){
		ImgApiResponse response =	imgService.getCor(request);
		return response;
	}
	
	@ResponseBody
	@RequestMapping(value="ton.do",method=RequestMethod.POST)
	public ImgApiResponse getTon(HttpServletRequest request){
		
		return imgService.getTon(request);
	}
	
	@ResponseBody
	@RequestMapping(value="emo.do",method=RequestMethod.POST)
	public ImgApiResponse getEmo(HttpServletRequest request){
		
		return imgService.getEmo(request);
	}
}
